#include <stdio.h>
 
int main()
{
    FILE *fp = fopen("d:\\test.txt","r");
	char buf;
	int cnt=0,i,j;
	//printf("%d\n",fp->_file);
	while(!feof(fp))
	{
		buf=fgetc(fp);
		 if(buf=='.'||buf=='!'||buf=='?')
		{
			cnt++;
		}
	}
	fclose(fp);
	printf("\n%d\n",cnt);
}